# @Time : 2021/8/4 10:05
# @Author : Li Kunlun
# @Description : softmax回归的从零开始实现
import utils as d2l
from mxnet import autograd, nd

y_hat = nd.array([[0.1, 0.3, 0.6], [0.3, 0.2, 0.5]])
y = nd.array([1, 2], dtype='int32')
"""
[ 0.30000001  0.5       ]
<NDArray 2 @cpu(0)>
"""
print(nd.pick(y_hat, y))
